﻿using System.ComponentModel.Composition;

namespace OperationPlugins.Validators
{
    /// <summary>
    /// The MEF interface for plugin validators.
    /// </summary>
    [InheritedExport]
    public interface IValidator
    {
        /// <summary>
        /// Validates an object.
        /// </summary>
        /// <param name="value">The object to be validated.</param>
        /// <param name="context">The operation context.</param>
        /// <returns>An instance of the <see cref="ValidationResultMessageContainer"/> class.</returns>
        ValidationResultMessageContainer Validate(object value, OperationContext context);
    }
}